package com.bbtree.springmvc.controller;


import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.bbtree.springmvc.RedisCommandUtil;
import com.bbtree.springmvc.rabbitmq.MessageProductorService;
import com.bbtree.springmvc.service.UserService;

@Controller
@RequestMapping("/user")
public class UserController {
	
	
	//private static final Logger logger = LoggerFactory.getLogger(UserController.class);  
	
	@Resource 
	private UserService userService;
	
	@Autowired
	private MessageProductorService messageProductorService;
	
	@Autowired
	private RedisCommandUtil redisCommandUtil;
	
	@RequestMapping("/test")
	public String index(){
		//messageProductorService.pushToMessageQueue("topic_queue_key", "hello");
		messageProductorService.sendDataToQueue("topic_queue_key", "hello");
		redisCommandUtil.AddLink();
		System.out.println(redisCommandUtil.getValue());
		System.out.println("test");
		return "showUser";
	}
}
